package com.homedo.odin.solution.contract.pc;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.homedo.odin.solution.model.base.PageResponse;
import com.homedo.odin.solution.model.dto.SolutionResponseBean;
import io.swagger.annotations.ApiModel;
import java.util.List;
import lombok.Data;

@ApiModel(description = "方案信息列表")
@JsonIgnoreProperties(ignoreUnknown = true)
@Data
public class SolutionResp extends PageResponse<SolutionResponseBean> {

    public SolutionResp() {
        super();
    }

    /**
     * @param list page页list
     */
    public SolutionResp(List<SolutionResponseBean> list, Integer pageNum, Integer pageSize,
            Long total) {
        setTotal(total);
        setPageSize(pageSize);
        setPageNum(pageNum);
        setList(list);
        setPages((int) Math.ceil((double) total / pageSize));
    }
}
